package com.redepronik.medisys.cithis.entity;

import java.io.Serializable;
import javax.persistence.*;


/**
 * The persistent class for the emailresponsables database table.
 * 
 */
@Entity
@Table(name="emailresponsables")
@NamedQuery(name="Emailresponsable.findAll", query="SELECT e FROM Emailresponsable e")
public class EmailResponsable implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="EMAILRESPONSABLES_EMAILRESPONSABLEID_GENERATOR" )
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="EMAILRESPONSABLES_EMAILRESPONSABLEID_GENERATOR")
	@Column(unique=true, nullable=false)
	private Integer emailresponsableid;

	@Column(nullable=false, length=100)
	private String email;

	//bi-directional many-to-one association to Responsable
	@ManyToOne
	@JoinColumn(name="responsableid", nullable=false)
	private Responsable responsable;

	public EmailResponsable() {
	}

	public Integer getEmailresponsableid() {
		return this.emailresponsableid;
	}

	public void setEmailresponsableid(Integer emailresponsableid) {
		this.emailresponsableid = emailresponsableid;
	}

	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public Responsable getResponsable() {
		return this.responsable;
	}

	public void setResponsable(Responsable responsable) {
		this.responsable = responsable;
	}

}